GXSetShapePixel
You can use theGXSetShapePixel
function to change the pixel value of a specific pixel in a bitmap shape.
void GXSetShapePixel(gxShape target, long x, long y, const gxColor *newColor, long newIndex);
target
- A reference to the bitmap shape containing the pixel to change.
x
- The index of the column in which the pixel lies.
y
- The index of the row in which the pixel lies.
newColor
- A pointer to a
gxColor
structure indicating the new pixel value of the specified pixel. You may specifynil
for this parameter if the target bitmap shape has thegxIndexedSpace
color space.newIndex
- An index into a color set. You may use this parameter to set the pixel value if the target bitmap shape has the
gxIndexedSpace
color space.DESCRIPTION
TheGXSetShapePixel
function sets the pixel value of a specific pixel in the target bitmap. The pixel is determined by the values you provide in thex
andy
parameters. The new pixel value is determined by thenewColor
ornewIndex
parameter:
This function posts a
- If you provide a color value in the
newColor
parameter, this function sets the pixel value of the specified pixel to be the closest color available in the color space of the target bitmap shape--even if the target bitmap shape has thegxIndexedSpace
color space.- Alternatively, and only if the target bitmap shape has the
gxIndexedSpace
color space, you may providenil
for thenewColor
parameter and provide in thenewIndex
parameter a new index into the color set of the bitmap shape.
functionality_unimplemented
error for disk-based bitmaps.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil point_does_not_intersect_bitmap (debugging only) functionality_unimplemented (debugging only) Warnings shape_does_not_contain_a_bitmap (debugging only) SEE ALSO
For information about thegxBitmap
structure, see "The Bitmap Geometry Structure" beginning on page 5-62.For information about pixels, pixel values, and pixel offsets, see "Bitmap Geometries" beginning on page 5-5.
To change more than a single pixel of a bitmap, use the
GXSetBitmapParts
function, which is described on page 5-75.To examine the value of a pixel, use the
GXGetShapePixel
function, which is described on page 5-71.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help